package com.kcs.fxmargin.service;

import java.sql.Connection;
import java.util.List;

import com.kcs.fxmargin.dao.TRateDetailDAO;
import com.kcs.fxmargin.model.TRateDetail;

public class TRateDetailService {
	
		
	public int insert(List<TRateDetail> tRateList,Connection conn) throws Exception{
		int res = -1;
		try{
			TRateDetailDAO dao = new TRateDetailDAO();
			 res = dao.insert(tRateList, conn);

		} catch (Exception e){
			e.printStackTrace();
			throw e;
		} 
		return res;
	}
	
		
	public int delete(TRateDetail model,Connection conn) throws Exception{
		int res = -1;
		try{
			TRateDetailDAO dao = new TRateDetailDAO();
			res = dao.delete(model, conn);	
		} catch (Exception e){
			e.printStackTrace();
			throw e;
		} 
		return res;
	}
	

}
